import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/processCategory',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/processCategory/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/processCategory',
    method: 'put',
    data
  })
}

/**
 * 获取全部流程分类数据
 * @returns
 */
export function getAllCategorys() {
  return request({
    url: 'api/processCategory/getAllCategorys',
    method: 'get'
  })
}

export default { add, edit, del, getAllCategorys }
